/*
 *
 *  ------------------------------------------------------------------
 *  Copyright © 2017 Hangzhou DtDream Technology Co.,Lt d. All rights reserved.
 *  ------------------------------------------------------------------
 *        Product:  EMR
 *    Module Name: NEZHA
 *   Date Created: 17-10-23 下午4:22
 *    Description:
 *  ------------------------------------------------------------------
 *  Modification History
 *  DATE            Name           Description
 *  ------------------------------------------------------------------
 *  2017-10-23      NEZHA EMR
 *  ------------------------------------------------------------------
 * /
 */

package org.xukai.remoting.sdk.web.monitor;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import java.util.Map;

/**
 * Created by moriarty on 17-7-17.
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class StageData {

    private StageStatus status;
    private int stageId;
    private int attemptId;
    private int numActiveTasks;
    private int numCompleteTasks;
    private int numFailedTasks;

    private long executorRunTime;

    private long inputBytes;
    private long inputRecords;
    private long outputBytes;
    private long outputRecords;
    private long shuffleReadBytes;
    private long shuffleReadRecords;
    private long shuffleWriteBytes;
    private long shuffleWriteRecords;
    private long memoryBytesSpilled;
    private long diskBytesSpilled;

    private String name;
    private String details;
    private String schedulingPool;

    private Map<Long, TaskData> tasks;

    public StageStatus getStatus() {
        return status;
    }

    public int getStageId() {
        return stageId;
    }

    public int getAttemptId() {
        return attemptId;
    }

    public int getNumActiveTasks() {
        return numActiveTasks;
    }

    public int getNumCompleteTasks() {
        return numCompleteTasks;
    }

    public int getNumFailedTasks() {
        return numFailedTasks;
    }

    public long getExecutorRunTime() {
        return executorRunTime;
    }

    public long getInputBytes() {
        return inputBytes;
    }

    public long getInputRecords() {
        return inputRecords;
    }

    public long getOutputBytes() {
        return outputBytes;
    }

    public long getOutputRecords() {
        return outputRecords;
    }

    public long getShuffleReadBytes() {
        return shuffleReadBytes;
    }

    public long getShuffleReadRecords() {
        return shuffleReadRecords;
    }

    public long getShuffleWriteBytes() {
        return shuffleWriteBytes;
    }

    public long getShuffleWriteRecords() {
        return shuffleWriteRecords;
    }

    public long getMemoryBytesSpilled() {
        return memoryBytesSpilled;
    }

    public long getDiskBytesSpilled() {
        return diskBytesSpilled;
    }

    public String getName() {
        return name;
    }

    public String getDetails() {
        return details;
    }

    public String getSchedulingPool() {
        return schedulingPool;
    }

    public Map<Long, TaskData> getTasks() {
        return tasks;
    }
}
